#include<stdio.h>
int main()
{
    unsigned long int n,m,a,l,w,s;
    scanf("%u %u %u",&n,&m,&a);
    if(n%a!=0) l=n/a+1;
    else l=n/a;
    if(m%a!=0) w=m/a+1;
    else w=m/a;
    s=l*w;;
    printf("%d",s);
}
